fc5abf36669840ffd34046a46ea74cede0e7df1e,plugins/tasks/tasks-core/src/com/intellij/tasks/context/WorkingContextManager.java,WorkingContextManager,saveContext,#String#String#String#,119
Before Change
private synchronized void saveContext(@Nullable String entryName, String zipPostfix, @Nullable String comment) {
try {
JBZipFile archive = getTasksArchive(zipPostfix);
if (entryName == null) {
int i = archive.getEntries().size();
do {
entryName = "context" + i++;
} while (archive.getEntry("/" + entryName) != null);
}
JBZipEntry entry = archive.getOrCreateEntry("/" + entryName);
if (comment != null) {
entry.setComment(comment);
}
Element element = new Element("context");
saveContext(element);
String s = new XMLOutputter().outputString(element);
entry.setData(s.getBytes("UTF-8"));
archive.close();
}
catch (IOException e) {
LOG.error(e);
After Change
private synchronized void saveContext(@Nullable String entryName, String zipPostfix, @Nullable String comment) {
JBZipFile archive = null;
try {
archive = getTasksArchive(zipPostfix);
if (entryName == null) {
int i = archive.getEntries().size();
do {